{%- set all_measurements = table_device_measurements.query.filter(
                               table_device_measurements.device_id == each_device.unique_id).all() -%}
{% if all_measurements and 'measurements_select' in dict_options['options_enabled'] %}

<div class="col-auto">
  {{form.measurements_enabled.label(class_='control-label')}}
  <div>
  {% set channels = table_device_measurements.query.filter(table_device_measurements.device_id == each_device.unique_id).count() %}
    <select class="form-control form-tooltip form-dropdown" data-placement="top" id="measurements_enabled" name="measurements_enabled" title="{{dict_translation['measurements_enabled']['phrase']}}" size="{{[10, channels]|min}}" multiple>

  {% include 'pages/data_options/TEMPLATE_Measurements_Enabled_Info.html' %}

    </select>
  </div>
</div>

{%- endif -%}
